package com.xlink.repository;

import com.xlink.domain.XlinkUser;
import org.apache.ibatis.annotations.Param;
import org.moon.rbac.domain.User;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * Created by Cathy on 2015/12/11.
 */
@Repository
public interface XlinkUserRepository {

    void register(@Param("user") XlinkUser user);

    Integer isUserNameExists(@Param("userName") String userName);

    Integer isemailRegistered(@Param("email") String email);

    Long login(@Param("user") XlinkUser user);

    void resetPassword(@Param("id") Long userId, @Param("password") String password);

    Integer updateUser(Map<String,Object> params);

    public User update(@Param("user")User user);

    Map<String,Object> getByEmail(@Param("email")String email);

    Map<String,Object> getById(@Param("id")Long id);
}
